#include <iostream>

using namespace std;

struct student
{
    //成员列表

    //姓名
    string name;
    // 年龄
    int age;
    // 分数
    int score;
};

void printStudent1(struct student s)
{
    cout << "姓名：" << s.name << endl;
    cout << "年龄：" << s.age << endl;
    cout << "成绩：" << s.score << endl;
}

void printStudent2(struct student * p)
{
    cout << "子函数2中姓名" << p->name << endl;
}

int main(void)
{
    //结构体做函数参数
    //将学生传入到一个参数中，打印学生身上的所有信息

    struct student s;
    s.name = "张三";
    s.age = 20;
    s.score = 85;

    printStudent1(s);
    printStudent2(&s);

    return 0;
}